babl: change MAX_BUFFER_SIZE to 512
authorØyvind Kolås <pippin@gimp.org>
Thu, 31 Aug 2017 22:02:32 +0000 (00:02 +0200)
committerØyvind Kolås <pippin@gimp.org>
Thu, 31 Aug 2017 22:02:34 +0000 (00:02 +0200)
This is the value that determins the smaller size big buffers are broken up in
and processed chunk-by chunk for multi-path conversions.

With tools/babl-benchmark for a particular workload and machine the following
results were attained, all values are in mb/s. There seem to be two sweet-spots
one around 128 and one around 512. Now using 512 which probably has better
cache behavior on most cpus than the old value 2048.

MAX_BUFFER_SIZE benchmarks,
    8:  437.1
   16:  458.8
   32:  495.0
   64:  482.6
   96:  496.4
  127:  508.8
  128:  514.2 506.7 495.1
  130:  494.6
  150:  479.5
  255:  492.2
  256:  491.0 486.8
  384:  500.8
  450:  503.7
  500:  499.6 496.5
  511:  477.8
  512:  511.0 508.7 500.6
  514:  499.3
  515:  504.7 502
  520:  512.9 491
  530:  501.8
  550:  483.3
  768:  493.0
 1024:  491.6
 2048:  489.5
 4096:  501.2
 8192:  499.0

babl/babl-fish-path.c

index 1dd8516bf3bc15bba6bd2b9ba43a91e4503b2c7b..202778a1552219a61e4268ad346e66a82424d14f 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 #define NUM_TEST_PIXELS            (babl_get_num_path_test_pixels ())
-#define MAX_BUFFER_SIZE            2048 /* XXX: reasonable size for this should be profiled */
+#define MAX_BUFFER_SIZE            512
 
 
 int   babl_in_fish_path = 0;